<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<tpl> include file ='../head.config.html' </tpl>
<script language="javascript" src="<tpl> $Site_Url </tpl>/js/jquery/jquery.blockUI.js"></script>
<link href="<tpl> $template_dir </tpl>/home/css/<tpl> $space_array.templates </tpl>_style.css" rel="stylesheet" type="text/css" />
<script language="javascript">
$(function(){
	$("#message_form").validate({
		errorClass: "wrong",
		rules: {
			txtSubject: {required:true}
		},
		messages: {
			txtSubject: {required: "<tpl> $langSpaceMessageContentCheck </tpl>"}
		}
	});
});
</script>
</head><body>
<tpl> include file ='../top.html' </tpl>

<!--公共部分-->
<tpl> include file="../public.html" </tpl>


<div id="comment" class="comments_list">
  <div class="box_content">
<div class="srr_rlm" id="bbsdiv">

<div class="gw" style="padding-bottom: 0px;">
	<div class="gw1" style="border:none">
		<div>
			<div class="fb_d2"><div id="content_div" name="content_div">
			<form id="message_form" action="member.php?action=message_save_add" method="POST">
				<input type="hidden" name="receiveuid" value="<tpl> $space_array.uid </tpl>" />
			  <textarea name="txtSubject" id="txtSubject" cols="70" rows="6"></textarea>
			  <label style="display:none" for="txtSubject" class="wrong" metaDone="true" generated="true"></label>			
			<div class="l mt5"></div><div class="rbs1"><input id="btn_qd" value="<tpl> $langSpaceMessage </tpl>" title="<tpl> $langSpaceMessage </tpl>" class="rb1-12" type="submit"></div><div class="flw5">&nbsp;</div></div>
			<div class="c" style="height: 1px;"></div>
			</form>
		</div>
	</div>
	<div class="c"></div>
</div>
  
<tpl> section name=m loop=$message_array </tpl>
<div id="comment">
	<div class="gw1" style=" border:none">
		<div class="q_cygl2">
			<div class="l50_s">
				<a href="index.php?uid=<tpl> $message_array[m].send </tpl>" title="<tpl> $message_array[m].login_name </tpl>" target="_blank">
					<tpl> if $message_array[m].picture eq '' </tpl>
						<img src="<tpl>$site_url</tpl>/app/space/templates/images/untitled.bmp" alt="<tpl> $space_array.username </tpl>"  width="45" height="45" />
					<tpl> else </tpl>
						<img src="../<tpl> $message_array[m].picture_small </tpl>" alt="<tpl> $message_array[m].login_name </tpl>" width="45" height="45" />
					<tpl> /if </tpl> 
				</a>
			</div>
		</div>
		<div class="gw12">
			<tpl> $message_array[m].subject </tpl>
			<div id="replydiv_170348258" style="padding-top: 3px;"></div> 
			<div style="float:left; display:block; height:30px; width:100%">
				<p class="gw_p2"><tpl> if $s_login_id eq $message_array[m].receive || $s_login_id eq $message_array[m].send </tpl><a class="otherlink sl-gray" href="javascript:replyComment( '<tpl> $message_array[m].messageid </tpl>' )"><tpl> $langSpaceReply </tpl></a><tpl> if $s_login_id eq $message_array[m].receive </tpl>┊<a class="otherlink sl-gray" href="javascript:;" onclick="if ( confirm ( '<tpl> $langSpaceAffirmDelete </tpl>' ) ) window.location.href='member.php?action=message_del&id=<tpl> $message_array[m].messageid </tpl>'"><tpl> $langSpaceDelete </tpl></a><tpl> /if </tpl><tpl> /if </tpl></p>
			</div>
		</div>
		<div class="c"></div>
	</div>
	<div style="clear:both"></div>
</div>
<tpl> /section </tpl>
    <tpl> if $message_array </tpl>
    <div style="text-align:right; padding-top:10px"><tpl> $pagelist </tpl></div>
    <tpl> /if </tpl>
</div>  
  
</div>
				
			</div>
</div>
</div>

</div>

</div>
</div>
<tpl> include file ='../../../../html/footer.html' </tpl>
<div id="reply" style="display:none; padding-top:3px;">
	<h3><tpl> $langSpaceReplyMessage </tpl></h3>
	<div class="gw1">
		<div>
			<div class="fb_d2"><div id="content_div" name="content_div">
			<form name="f" action="member.php?action=message_reply" method="POST">
				<input type="hidden" name="messageid" id="messageid" value="" />
			  <textarea name="txtSubject" id="txtSubject" cols="50" rows="10" style="height:150px"></textarea>	
			<div class="mt5"></div><div class="rbs1"><input id="btn_qd" value="<tpl> $langSpaceReply </tpl>" title="<tpl> $langSpaceReply </tpl>" class="rb1-12" type="button" onclick="this.form.submit()" > <input type="button" title="<tpl> $langSpaceCancel </tpl>" value="<tpl> $langSpaceCancel </tpl>" class="rb1-12" onclick="javascript:closeDialog();" /></div><div class="flw5">&nbsp;</div></div>
			</form>
		</div>
	</div>
	<div class="c"></div>	
</div></div>
<script>
var show = $('#reply');
function replyComment(id) {
	$.blockUI(show, { width: '350px', height: '230px', backgroundColor: '#FCF9E6', border: '1px solid #EBE6C9' }); 	
	$('#messageid').val(id);
}
function closeDialog() {
	$.unblockUI();
}
</script>

</body>
</html>